import service from '@/utils/request'

// 获取标签列表
export function getTags(params) {
  return service({
    url: '/tags',
    method: 'get',
    params,
  })
}

// 创建标签
export function createTag(data) {
  return service({
    url: '/tags',
    method: 'post',
    data,
  })
}

// 更新标签
export function updateTag(data) {
  return service({
    url: `/tags`,
    method: 'put',
    data,
  })
}

// 删除标签
export function deleteTag(id) {
  return service({
    url: `/tags/${id}`,
    method: 'delete',
  })
}

export function deleteBatch(ids) {
  return service({
    url: '/tags/deleteBatch',
    method: 'delete',
    data: ids,
  })
}
